function OCR(){
    //请求截图权限
    if (!requestScreenCapture(false)) {
        toast("请求截图失败");
        exit();
    }

    var img = captureScreen();
    var imgclip = images.clip(img,500,27,50,25);//556 57
    imgclip.saveTo("/sdcard/04.png");
    img.recycle();


    var url = "http://192.168.16.172:8080/aaa";
    var result = http.postMultipart(url,{
        file:open("/sdcard/04.png")
    })
    log(result)
    var json = result.body.json();
    log(json.core)
    log("mess=="+json.mess)
    return json.mess;
}
var sum = OCR()
log(sum)
log(sum[0])
var r = random(0,5);
var t = random(200,700);
var flag = sum!="" && sum[0]!="0"
log(flag)
if(false){
    log("打开建筑工人")
    sleep(500+t);
    click(460+r,30+r);//建筑工人

    sleep(500+t);
    click(489+r,359+r);//选项 对象

    sleep(500+t);
    click(705+r,644+r);//升级 按钮

    sleep(500+t);
    click(613+r,653+r);//选项 对象

}